fix issue on Xcode 6
Merge pull request #7019 from minggo/v3

fix issue on Xcode 6