Switched to userdict for obsolete Python versions