Electronic structure and spin state of fluorinated metal phthalocyanine molecules