Research shows that philanthropy is a valuable strategy when big companies like HSBC get into trouble.