Fixed build with XCode.
Merge pull request #3741 from yglukhov/xcode_fix

Fixed build with XCode.