fix up weakref.cc after v8 api change

This is a cherry pick of joyent/node@dc29d64983f16fae79a9e293dbd3106bf69171db.