Fix “WeakMap is not generic”

This was reported in issue #10 and also affected Safari on Mac OS X and
iOS.
Fix parentheses placement in Set.forEach

This was reported in issue #11.
Merge pull request #12 from hansmi/hansmi

Fixes for issues #10 and #11