Swiss bank UBS posts 24% profit slide but beats analyst expectations