Add polyfill for CustomEvents

JS CustomEvents need a polyfill to work properly in IE:
https://developer.mozilla.org/en/docs/Web/API/CustomEvent

This commit includes a polyfill
Merge branch 'master' into plugin-gallery