[TSan] fix undefined variable in debug TSan build