Fix Xcode 5 warnings and errors