Backport squid3 for the sake of 2012Q2 and 2012Q4