White House says Spain has agreed to cooperate with US operations in Mideast after Trump threatened financial penalties