Makefile OSX/BSD compatibility

Fixes #7