Only show close button in headerbar for some environments.