Global analysis of an SEIR model with varying population size and vaccination