Update Makefile

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