Don't you only want to do this polyfill if CustomEvent isn't defined already?