Only check cordova when needed
Merge pull request #10 from jperl/master

Only check cordova when needed for performance