RF: add (partial?) python 2 compatibility

Make code somewhat more ugly by adding Python 2 compatibility.

I wasn't able to get the citeproc-test set up properly to test this well.

I added a restructured text formatter and an example script in another pull request.