Boundary counterterms and the thermodynamics of 2-D black holes