Change from getClassLevels to levels for latest caret package.