Boy accused of beating 2-year-old foster child to death