UBS profit beats views on investment banking boost