tsan: fix test for -O2