fix deprecation warning for iOS4+