Python2.6 compatibility fix

Adapted syntax to provide Python 2.6 compatibility.
Added tox.ini for easier testing of Python 2.6 compatibility.