Asymptotic normalization coefficients of resonant and bound states from the phase shifts for $\alpha\alpha$ and $\alpha^{12}\rm C$ scattering