Scattering of the electromagnetic wave by a layer with one-dimensional rectangular irregularities