Percolation in the effective-medium approximation: Crossover between phonon and fracton excitations