Fix threading warning discovered with MSVC -Wall

MSVC in -Wall mode creates approximately 6,500 warnings. 5,000+ of which are
from the std library. The one gem was the potential for threading issues with
the initilization of a function scoped static.

This fixes that.