The effects of population size histories on estimates of selection coefficients from time-series genetic data