Thermodynamic correction for salts in variably saturated porous media