return CustomEvent in polyfill if it doesn't exist