Backport of openwrt curl