Dielectric Constant of Water Confined in a Nanocavity