Fix scope of loop variable when iterating defaults

When iterating over _defaults the `key` variable is not scoped. This
breaks compatibility with libraries that are trying to globally expose
a `key` variable or function, such as keymaster.js
Merge pull request #228 from aschepis/scope-fix

Fix scope of loop variable when iterating defaults