Fix thread local random number generator static issue