build fixes for XCode