fix build with old curl version