U.S., Spain agree use of military bases in Spain for Afghan refugees