Karzai wants pact with US but says raids must end