Determination of sulfate and sulfur in inorganic and organic materials