Irreducible families of curves with fixed cohomology