cross-browser compatibility fixes, Firefox and IE9+