Corrosion inhibitor for closed-loop water systems