configure.in: use AC_TRY_COMPILE to avoid a symlink attack in /tmp during compilation