Add iOS 6 compatibility