Added support for legacy browsers (IE 8/9)