Update Makefile

original ordering of math library was causing log, ceil and pow to be undefined in the linker with gcc 4.6.