Ion synthesis and FMR studies of iron and cobalt nanoparticles in polyimides