Fix settitle function on OS X