Add shims to support encoding/json pre-Go1.2