Obama says risky to attack Iran, wants diplomatic fix