test: fix up weakref.cc after v8 api change
test: fix up weakref.cc deprecation warnings