better event binding (cross-browser)

per @plantas' comment: https://github.com/dobarkod/cookie-banner/commit/d1c5e2bb337c2a492a0bd91e30025a18ae161d90#commitcomment-5022234