ifdefed stuff only available in newer curl releases

as in #147