Update ValueSerialization.cs

Fix to issue previously discussed with invalid cast made from HashSet<T> to ICollection in Serialize function.

Thanks,
Stuart