Inference of genetic forces using a Poisson random field model with non-constant population size