Transverse-magnetic nonlinear modes in a nematic liquid-crystal slab waveguide