Fix IE6-8 incompatibilities