fix .net 2.0 compilation issue

HashSet should not be used; System.LINQ should not be referenced.