try use document.head 

see https://developer.mozilla.org/zh-CN/docs/DOM/document.head
use window.document instead document

when pass other windowref to the seajs factory, unexpected document ref
Merge pull request #1040 from yanbingbing/master

document ref improvement