Sets proper content-type header for JSON