Share more code between mosml and poly Holmake.

Work on github issue #77