Added polyfill for CustomEvent, res.js should support IE9+ now