Handle zero right hand side in CG and GMRES