Support cURL if it's enabled

Add cURL support in a modular way. cURL is not a dependency but can be used if there are environments or developers that don't have url fopen enabled.