A helical lid converts a sulfotransferase to a dehydratase