Prosocial norms and degree heterogeneity in social networks