Velocity dispersion in the interstellar medium of early galaxies