Fix Makefile error on Unix by adding -lm to linker flags