fix(export): Correct detection of admin mode (closes #5276, fixes #5088)