Improve the IE8 workaround for responsive images (see #5789)