Latest cgminer from git doesn't seem to want to do long polling in conjunction with p2pool any more. Pastebin link to log:
http://pastebin.com/g3A3z1hb (note line 46, where the long polling URL is sent)
After reverting to 2.8.7 (git checkout v2.8.7), long polling works again.