wait for cordova to load