optimization-logger.hh: only log Jacobian if the constraint is differentiable.