Thanks. I think I see the problem now. I installed the attached patch into master. Although a similar patch presumably would be useful in emacs-25, it's a bit late in the day to be fiddling with emacs-25 merely to port to a new platform.