Fixed display detection if DISPLAY is not set.