fixed Makefile to compile correctly on Mac and Linux