Fixes for XCode building