Improve cordova detection