Fix for IE8

Message: Object doesn't support this property or method

It happens with IE8 standards document mode.