Patch to support up to Firefox 40 and Chrome 40