Cordova is not attached to window object