fallback for browsers that don't support createEvent('CustomEvent')