Preparation of sulfur-containing organic compounds