moved (re-)definition of doi into \AtBeginDocument