Updated to work in Xcode 6.