Minimal bi-directional object references for JavaScript