Fix crash on iOS 4.