Fixed compile errors on Xcode 6.1.1