CustomEvent polyfill for IE9 and IE10

Thanks to @monobasic for pointing me to the solution!
Closes issue #1