Electronic and phonon structures of AuGa2 and AuIn2