Make sure Qt calls XInitThreads