Calculation of the dynamic first electronic hyperpolarizability β (- ω σ; ω 1, ω 2) of periodic systems. Theory, validation, and application to multi-layer MoS2