Tiny utility to safely stringify objects with circular references