Leicester boss Claudio Ranieri says it was important to finish a year to remember with a win after they beat West Ham.