configure: Fix -lm test, so that tools can be compiled on hosts that require -lm