Cognitive impairment in long-standing bipolar disorder and behavioral variant of frontotemporal dementia