Compilation fixes for tests