Fixup missing test code and build on OSX.