changes for building on OSX