Make it work with node, mocha and jsdom

When using Fingerprint in a node/mocha/jsdom test environment I found out that the map function could not be used due to wrong scoping.
These changes fix the scoping by passing in the window object as the explicit scope