Fix offline detection (bug 1014508)

https://bugzilla.mozilla.org/show_bug.cgi?id=1014508

WIP: doesn't work, I'm getting status 0 for the XHR, even if I'm just making a HEAD, which is weird.