Treatment of waters in cooling systems