Collective action and the evolution of social norm internalization