Extended model for the reconstruction of periodic multilayers from extreme ultraviolet and X-ray reflectivity data