$\Lambda, \Xi$ and $\Omega$ production at mid-rapidity in Pb-Pb and p-Pb collisions at 158 A GeV/c