added support for IE lower than 9