use -fno-threadsafe-statics, issue #1128