errors as JSON if application/json is in Accept (bug 1013440)