How will this affect using lunr as an npm module? Might need a check around whether `window` exists before assigning `lunr` to it.