corrections for compilation errors on OSX