Fix check as per commit 33d8ee6bdf01a34e4e7f8bd2224a7d018d8d8acb.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Support both older and more recent version of libmagic in tests.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>