Modify script to conform with recent version Cordova