Fix builds for tests