Accept header in JSON responses

Updated `JsonResponse::prepare()` to _actually_ take the `Accept` header into account when setting the `Content-Type`.

Previously it looked like it did this, but actually failed to most times.