Patent Licensing and R&D Rivalry