#470 change the CustomEvent polyfill to work with older browsers

With this change, the Ionic sidebar button event fires for me (although the sidebar is not yet functional).