Fix compilation warnings on OSX.