FIX: Fix for py2.6

Squashed commits. Should work for Travis (we'll see).