Fix curl multisession failure for master branch

same with #4542, but this is for master branch.