Obtaining compounds having halogen atoms directly bound to the phthalocyanine skeleton