Fix compilation error on iOS and OSX.