Fix dom methods in IE8