Test if cordova is defined