Add python3.4 compatibility layer