Avoid dependency on global document.

I would like to use this library in the context where there is no single global or document (It is a browser code that has access to every document loaded, but there is not a single one that we could pick) there for it isn't possible to provide something like `require("global/document")`.

As far as I see `createElement` without document, is just for a convenience of the API, if it's really crucial maybe some other package could wrap this `createElement` to do that.