Backport of Go 1.1's encoding/json to get the fix for issue 3069