Knowledge protection and partner selection in R&D alliances