Fix for issue #177 -lm and -lc link order

This fixes a 'undefined reference to `__errno' caused by
libm being placed after libc during linkage.
Corrected by moving -lc after -lm on the linker command.