Fixed build for OSX