Heats of reaction from self-consistent-field energies of closed-shell molecules