test: fix up weakref.cc after v8 api change