Analytical model for the refractive index in quantum wells derived from the complex dielectric constant of Wannier excitons in noninteger dimensions