This reverts commit ec4f56b347. With the added patch, the curl segfault seems to be fixed.
ec4f56b347