Simple javascript set implementation