get the cmake build to work with OSX