On the nonsingularity of a special class of centrosymmetric matrices arising in spectral methods in BVPs