Improve support for old IE (<=8)

Those changes allowed my own application specs to pass on IE8.