Added proper X11 library detection