Update code for Firefox 29 and later