Fix wrong document ready state recognition in IE.