Fires deviceready when running in Cordova; domready otherwise