Fix run script and build for Xcode 6