Testing for time-varying Granger causality