Avoid division by zero when forming CG preconditioner in algebraic_connectivity