Attempt fix incompatibilities with python2.6. Refs #17