Complex singularities in nonlinear wave equations