Use autoconf macro to compare versions.

This should fix problems on systems where `find` doesn't know how to sort version numbers.