Added CustomEvent polyfill to fix Casper test problem with Spektral.createEvent. Will integrate polyfill into createEvent to avoid this problem in the future.