Fix encoding objects with proxies
0.2.1