Toward a naturalistic foundation of the social contract