Fixed invalid js installation. Added cordova.define