Stable R&D Cooperation with Spillovers