upgrading for a compatibility with 2.7 2.8 and 2.9

based on https://github.com/apache/cordova-ios/blob/master/guides/Cordova%20Plugin%20Upgrade%20Guide.md