different constructor for CustomEvent (based on the DOM4 spec)

Firefox implements like this:
- https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-customevent
- https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Constructor