Temperature-dependent Heisenberg exchange coupling constants from linking electronic-structure calculations and Monte Carlo simulations