Do you know what version the one in Ubuntu 22.04 is? AFAICT autoclose hasn't changed since the 1.36 release, so if its newer compiling won't help.
If you do want to compile from git you can configure with `--disable-all-plugins --enable-autoclose` to only build autoclose, see the readme.