Fix topbar resize issue

Fixes #85
Ah. I see we pass in `$document` when setting up matchMedia. `$document` is basically an alias for `$window.document` so you may want to ensure that the `$window` in the spec has a document property.