Only check cordova when needed