Allow accessing dimension attributes with strings

Fixes #232