Generalized Effective Medium Theory to Extract the Optical Properties of Two-Dimensional Nonspherical Metallic Nanoparticle Layers