US president also made unusually critical comments about Israel's military offensive in Lebanon.