[core] Workaround bot.connecting missing in python 2.7.3 or older

See issue #559
If this commit helps you then you REALLY need to update your python
install to something newer, for bugfixes and security fixes.