Finite-gap solutions of the massive Thirring model