Perfectly matched layers for the truncation of finite elements meshes in layered half space geometries and applications to electromagnetic scattering by buried objects