Determination of the poles of the topological zeta function for curves