Fixed compilation errors in Xcode 6.