Use content type text/plain for older browsers

Some older browsers, such as IE9, don't handle the application/json content
type very well. They offer their download dialog and expect the user to do
something with it. For browsers that do not claim to handle
application/json, this commit returns a content type of text/plain, which
these browsers do handle transparently.