Companies are tying their loans to measures of do-goodery