Make use of navigator.connection when available to determine online status