Anchoring Transition in a Nematic Liquid-Crystal Composed of Centrosymmetric Molecules