python3 support - string encoding

Python 3 uses different default string encoding conventions than Python 2 does.
This patch allows the library to switch calls depending on the python
version in use

partial https://github.com/vmware/pyvmomi/issues/55