since you're not running an lxsession anymore, it doesn't come as a surprise that lxsession-logout doesn't work anymore.
maybe you should just use sth else instead of editing source code and recompiling. it seems too impractical a solution for such a simple problem.
fwiw, crunchbang used to have a dead simple python script that could easily be adapted to your needs.
it's called cb-exit, maybe you can find it somewhere.