Fix for IE firing document ready too soon (Bug #1320).