Fix code for Xcode6.1-beta2.

This is a quick fix for Xcode6.1-beta2.

iOS Example works well, but Xcode will crash when unit-testing for some reason...