Knowing more than one language may prevent dementia, study suggests