Fabrication of magnetic microstructures by in situ crosslinking of magnetically assembled nanoparticles