Fix HashSet<T> constructor in JS to match JVM capabilities