Added support to old browsers with a partial WeakMap shim