The president’s comments come after Hamas said it would postpone this week’s exchange over a dispute about aid.