Quasi-isentropic compressibility of deuterium and helium at pressures of 1500–5000 GPa