Check for the existence of Cordova before calling 'addConstructor'

If you are using Sencha Touch or another HTML5 framework, and do most of your testing in the browser, it is helpful not to throw an exception if Cordova isn't present.