Initialise x11 threads, fixes random crash