set title for window when document title is available