ecs module: add backward-compatible support for Python 3.3+
Merge pull request #2364 from felixonmars/ecs-py3

ecs module: add backward-compatible support for Python 3.3+. Fixes #2364.