Electrochromic devices based on surface-modified nanocrystalline TiO2 thin-film electrodes