fix for compilation on OSX