cocoa: mark window for redraw after title change

This used to work correctly without the call to displayIfNeeded. I think this
may only be needed for Yosemite.

Fixes #1330