Coupling of metal-organic complexes to magnetic substrates investigated by polarized x-ray absorption spectroscopy