Phonon-mediated anisotropic superconductivity in the Y and Lu nickel borocarbides