Makefile improvements for compiling on OS X