Automatic differentiation of the vector that solves a parametric linear system