IE8 does not support window.innerWidth. Workaround added