Two-band superconductivity in (AlMg)B2: Critical temperature and isotope exponent as a function of carrier density