Add dispatchEvent polyfill in element-events.js

Found here https://gist.github.com/jonathantneal/3748027
Merge pull request #8 from MoOx/patch-1

Add dispatchEvent polyfill in element-events.js