Random surface Monte Carlo determination of the critical exponent ν in Z(5) and Z(8) lattice gauge theories