Some fixes to get python interface to compile again

With these changes, the python interface compiles without problems (tested on OS X and CentOS 6.5, at least).

It now also works with both python 2 and 3. Python 3 support was just a matter of fixing some print statements in configure.ac.