cURL: use global cleanup when exiting