polyfill for ES6 WeakMap