Check for deviceready with Cordova