Add missing `var`.

`key` is leaked to the global namespace. Detected the issue thanks to Mocha reporting `Error: global leak detected: key`. This pull request fixes this.