Algebraic conditions for high-order convergent deferred correction schemes based on Runge-Kutta-Nyström methods for second order boundary value problems