1.8 compatibility changes

For comparison with #152 and #147
This file isn't necessarily going to be loaded before running one of the other test files, I don't think. Should this go in a `test_helper` file that is required in each of the test files?