Pelosi shows pragmatic streak in pursuit of border deal