A new representation for the dynamic green's tensor of an elastic half-space or layered medium