On the two-phase free boundary problem for two-dimensional water waves