Make it compilable (but not tested!) with new Xorg.