Fix compilation on OSX