Fixed build on OSX and iOS.