String equations for the KdV hierarchy and the Grassmannian