more robust matchMedia