Use copy() and update() to merge dicts for Python 2/3 compatibility.