Update main.mk

Adding -lm to makefile to test building on solaris and freebsd