Preparation of crosslinked composite nanoparticles