Fixed use of reduce for Python 3.3+

Fixes #100.