U.N. chief says two-state Mideast solution is the only way