Model-independent constraints on the cosmological anisotropic stress