Fix build type issue in unit tests for WeakMap.