mac: Add APIs on setting icon in titlebar.