Fix for cordova plugin by using exec instead of cordova.exec