Fixed compile errors after upgrading Xcode to 6.1