Cherry pick benjie commit b661932da442632499d37253059d56e394d4ce72
Fix Xcode 5 compile error