Fixed an issue with cmake x11 code