Registering finalizer for CURL handles