[Firefox] Workaround for sessionStorage error when the preference network.cookie.lifetimePolicy is set to 1 (bug 1000777)

The error is described in [bug 365772](https://bugzilla.mozilla.org/show_bug.cgi?id=365772), which is a seven (!) year old bug :-(

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1000777.