Fix makefile to work properly on OSX