Optimal Technology Sharing Strategies in Dynamic Games of R&D