The density variance - Mach number relation in isothermal and non-isothermal adiabatic turbulence