Effect of piracy on innovation in the presence of network externalities