Palestinians agree to form unity govt