Don't try to set the title if we're headless.

Otherwise this tries to load LWJGL which breaks our tests.