Fix iOS 6 deprecated warnings

Please merge this to remove iOS 6 deprecated build warnings.