make it work under cljs

I figured that it was a problem of `clj->js`. To be honest, I would love to rework those stacks into clojure transients, but it's a bit too late and I didn't figure out how to run all expansions. Maybe `lazy-seq` would help there... Anyway, those changes make it work under CLJS. I figured that having separate `index-of` is better than trying to figure out than converting all paths into javascript arrays. :)
Yeah, if you look at implementation of `index-of`, it returns `nil` if nothing was found. And `0` is not `nil` in clojure, `if-let` will bind that.