Python 3 compatitbility

I have to make these changes to get openmm to work with python 3. I think these changes will break under python2, so this isn't for merging but rather to highlight the issue.