Optical sensors based on phthalocyanine thin films