build: fix build when wayland is disabled
HAVE_GTK_X11 and HAVE_GTK_WAYLAND are defined with set10, so we should use #if instead of #ifdef because it is always defined.
HAVE_GTK_X11 and HAVE_GTK_WAYLAND are defined with set10, so we should use #if instead of #ifdef because it is always defined.