Fix build scripts for iOS8.1 and XCode 6.1