A pure JS implementation of the structured clone algorithm (or at least something pretty close to that)