Fix iOS 5 support