ie8 bug fix document.head not available