Time-varying impact of pandemics on global output growth