Update Makefile

original ordering of math library was causing log, ceil and pow to be undefined in the linker with gcc 4.6.
Merge pull request #1 from ctSkennerton/patch-1

Update Makefile