safely check if cordova is 'undefined'
Build
Merge pull request #13 from jonotron/fix-cordova-reference

Fix cordova reference