Adding some changes to makefile to compile on OSX.
It fails to run on OSX however.  Needs debugging.