mod_base: Fix filter_capfirst to support i18n strings
(cherry picked from commit 69ac26189826661c9dedb4b88e7f353271f61f81)