replace system file to avoid undefined symbol: magic_version errors