Dealing with issue #355; magic bit file detection on the c++ code