Fixes to compile on Xcode 6.1