Nonlinear periodic solutions for isothermal magnetostatic atmospheres