Musharraf offers to mediate in Mideast