Afghan presidential rivals agree to share power