weakref: fix deprecation warning after nan upgrade

The memory management of the `data` structure is now handled
internally by nan.