Fix xcode6 beta 2 XCTest compile error, #540

Rebase PR #540