bpaste: Make it work under Python 2 and 3.