Fixed setup scripts for OSX.
iOS specific fixes.