Fix handle of resource response to interpret JSONP correctly