opsworks module: add backward-compatible support for Python 3.3+

No unit tests to test with, all integration tests passed.