Issue #139: use a different method for cloneDeep.

Fixes #139.