Complex and singular solutions of KdV and MKdV equations