make pagination work for both bootstrap versions