Fixed build on iOS and OSX.