Tweaked the build to work on OS X as well as Linux