Remove unused has_magic.

This will allow inlining get_magic, which should in turn fix one of the mingw
build problems after the switch to std::error_code.