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

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