Generalized frequency-domain synthetic aperture focusing technique for ultrasonic imaging of irregularly layered