An alternative to window.matchMedia to respond to CSS breakpoints changes in Javascript