Finite-size calculation of the dynamical critical exponent of the three-state Potts model