Correctly check XDG_CURRENT_DESKTOP environment variable

"The XDG_CURRENT_DESKTOP environment variable can contain a list of
desktop names. The existing code assumed it could only contain one
name."

Solution by Robert Ancell

https://bugzilla.gnome.org/show_bug.cgi?id=739592