switched to multithread and added line to check for __unix before calling
XInitThreads()