Magnetic separation of GdC2 encapsulated in carbon nanoparticles