Wonder about building it in aout mode, -f aout? Nice and simple, x86inc.asm should have the macros and should only take minor patching following whatever Mach does. Should work fine if only LDFLAGS has -Zomf for a standalone DLL.
Which source did you use, I might try