Thanks for the patch. I've checked the functionality briefly with my wiki, the dead links no longer appear.
However, your removal of the lines
DOKU_INC.'lib/scripts/domLib.js',
DOKU_INC.'lib/scripts/domTT.js'
in dokuwiki/lib/exe/js.php seems to break the plugin folded (does not unfold any longer). At least, after re-inserting these two lines, folded worked again.
Another issue I've came across: when using the ajax variant of the indexmenu plugin having the tree nodes opened till second level, e.g.
{{indexmenu>:mynamespace#2|js#IndexMenu+ajax}}
where "mynamespace" refers to a namespace having more than two child levels, the nodes will not load after clicking on the + sign to expand the nodes. The word "loading" appears, but the child nodes are not shown.
There is no issue when all levels of a namespace, e.g.
{{indexmenu>:mynamespace|js#IndexMenu+ajax}}
are to be shown. I've noticed this behaviour using Firefox (for Windows version 2.0.0.1),
only. Using IE (for windows, version 6.0) the plugin works as expected.