For thread-safe calling of C++ constructs of statically allocated class instances some platform support code is needed. This commit ads one implementation compatible with g++.