Fix for compilation on OSX