call XInitThreads() at application startup