encoding/json: don't panic on incorrect map argument

Fixes issue 8305.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/145680044