Fix bad memory being passed (due to going out of scope) to set title on X11.