Virasoro symmetry of constrained KP hierarchies