Fix backwards version sort when detecting host Automake directories