I had a similar issue but wanted the Mac edition of my program to have a Help that looked like the Windows one, rather than the native Mac style. I also wanted to re-use the same HTML files as in the chm, as it's a big set.
Of course the PureBasic IDE does this beautifully! So I wrote my own module, with similar appearance to the PureBasic help and working from the same kind of XML files to give chm-style contents and index (hope Fred doesn't mind!). It works well for me.
It's part of a large project, but if anyone's interested I can post some code.