Quantization of electrodynamics in nonlinear dielectric media