Fix errors in modal.js after merge
Fix errors in modal.js after merge

Merge from master overwrote the use of `Browser.getWindow()` when adding
event listeners, so this has been re-implemented.

Fix linting errors.

Sage/carbon,Sage/carbon,Sage/carbon