Change content-type header for JSON data

Fixes #1074