Added IE weakmap support