Fix build in WITH_LIBMAGIC case
PR: 72495 Submitted by: Rene Ladan <r.c.ladan@student.tue.nl> Approved by: maintainer