make sure json requests are returned with right mimetype