Node.js shim for window.document