Social Spending and Aggregate Welfare in Developing and Transition Economies