update weakmap shim to avoid native dep