Healthy lifestyle may offset genetic risk of dementia