Nonlinear waves guided by a dielectric slab