Event dispatching in IE < 9

I've had some error messages in IE < 9. The patch is based on a solution from Dean Edwards:
http://dean.edwards.name/weblog/2009/03/callbacks-vs-events/

I have actually no idea how to mock old IEs in tests, but the current tests are all passing.