Added an IE8 fix

This little fix makes the script work in Internet Explorer 8.