Adding support for Cordova 2.2.0+