Remove usage of QUnit.addEvent() which is no longer available

QUnit has removed addEvent() from being publicly accessible, so use browser events instead.