Change document to , direct .cordova.exec calls for functions that need it.