The relation between the waveguide and overlap implementations of Kaplan's domain wall fermions