handle old curl versions