Optical-model analysis of antiproton-nucleus elastic scattering at 50 and 180 MeV