Compilation fixes for unittest build.