Innovation, international technological diffusion and the changing influence of R&D on productivity