Nonlinear bent single-mode waveguide as a simple all-optical switch