Dispersion of magnetic nanoparticles in a polymorphic liquid crystal