Fix unit tests for osx/*nix