backwards compatibility for Python 2.5 runtime