Fix Xcode 4.2 compilation issues