Make the build script compatible with OSX