add dispatchEvent polyfill for IE8