1.8 compatibility changes

For comparison with #152 and #147
I have no strong opinion about it. If you'd like me to remove it, I will.