Safe-haven dollar firms as war widens in Middle East