Fix compilation problem on OSX