Afghanistan, US solve security pact impasse: official