Don't use enum ordinal as array index

This fixes a crash when setting up WebDAV accounts.