Unsaturated polymers modified by compounds containing a thiol group