Change static variables that hold pointers to the C++ pending exception and C++ throw function to extern to allow sharing between modules.
The MS compiler does not allow thread local variables in the DLL interface. So, this change wraps the thread local variables with get functions that return a reference to the thread local variables.