Improve VM detection and autoconf.