Javascript: remove object from VM at finalization