Effective permittivity of porous media: a critical analysis of the complex refractive index model