All-optical switching in a liquid crystalline waveguide