Made necessary changes to build on Xcode 6.1