http: prevent segfault during curl handle reuse