You know him best, so trust your instincts. If it is a major shift in his daily pattern, it seems unlikely that it is behavioral (plus, teachers in kindergarten tend to be good at noticing major changes in environment). Thus, it seems likely to be constipation. The two biggest things that you can do to help him in this case are
1. Use an OTC stool softener, like Miralax
2. Have him do timed bowel sits. This means that a couple of times a day (once before school and once in the evening, if possible), ask him to take a book, toy, or game with him to the bathrooom. Every couple of minutes, he should try to "push out" all the poop. Things may be stretched to the limit and quick bathroom visits only make that worse. He really needs to work those muscles.
For background: This isn't something that gets enough medical attention, but our American diet is terrible on our GI tract. Add to that, there is no medical definition of constipation and it is under-reported by radiologists. We have been told this by our son's specialist, who has the evidence to back it up (pun intended).