Circuits for cold-junction compensation