Compensate for cURL calculating header length differently with proxies

cURL versions below 7.30.0 did not include any proxy "Connection
Established" header in the total length of response headers. Newer
versions do, so this change compensates consistently across the cURL
and PHP streams implementations.