Change edge case in Node API sans window to find any document object as a global rather than on exports