Magnetic properties of graphite irradiated with MeV ions