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