Locating All the Modes of Green's Function for a Three-Layered Medium Based on the Path Tracking Algorithm