(Apple) Build fixes for OSX/iOS