Fix curl build with thirdparty module when system curl is available too.