How patent rights affect cumulative innovation