fixing an issue happening on IE8 when matchMedia is initialized inside of a
resize callback.