Use deviceready event for Cordova in testing if available