Parse JSON response based on the service type, not content type

Fixes issue #136 as well as fixes aws/aws-cli#553.