Add -lm to LDLIBS on Solaris