Probability distribution of magnetization in the one-dimensional Ising model: effects of boundary conditions