added compatibility for LuaLaTeX