Fix iOS 7 compatibility for UIKeyboardImpl