Make tests work on Python versions below 2.7