Fixed placement of -lm option to link against the math library. 

Static lib -l options can't go in cflags, since they're specified before input files, and static libs are only checked for undefined references that the linker already knows need defining.

This fixes the build on Ubuntu 12.04.