Backport some symbols to Python2.5

Signed-off-by: Michael Weber <michael@xmw.de>