call XInitThreads only when Xlib code is used