fix compiling errors for iOS projects
Merge pull request #4966 from minggo/master

fix compiling errors for iOS projects