Fix IE8 infinite onresize loop

Check to ensure the viewport width has changed before setting the viewport height, which in certain circumstances can cause IE8 to delve into an infinite loop of onresize events.