As a general rule, we at bug-gnu-emacs don't support third-party libraries. The code looks pretty crufty, but the attached minimal patch might get it working again for you. If you have any further problems with it, someone on the help-gnu-emacs@gnu.org list might be willing to help.