file access: only use linux/magic.h when it's present