Synthesis of general polarization transformers. A geometric phase approach