Fix window size restoring in Firefox 17+