Add configure.ac check for libm