tweaks towards getting a clean compile on both Linux and Darwin

glk's first pull request, if this works