Backported changes from default.latex to default.beamer in order to improve Unicode support