Make it work with newer Org

Not sure exactly how it works; I mostly copied things from ox-beamer.el
and tweaked it until it gave the expected output.