Changed iOS 7+ method calls so that project can be run with older SDKs.