Patents and Welfare in an Evolutionary Model