fix issue #243

require cordova to local variable instead of access the global cordova variable
Merge pull request #244 from photomania/fix-possbile-js-error-#243

Fix possible js error - issue #243