Inequality, Cooperation, and Environmental Sustainability