The gas-solid density effect for MeV/u ions: Charge changing cross sections and the effective charge