Fixed build on OSX, iOS and Linux.