Add Cordova compatiblity