Fix tests without an X server.