An Efficient Approach for Simulating Wave Propagation with the Boundary Element Method in Multilayered Media with Irregular Interfaces