Companies are turning their environmental liabilities into cash