Changed the updateWindowTitle() method to a cross-platform one.