Fix tests for IE8 and IE9