Compatibility fixes

 * Works with 3.4 and 2.7
 * testCompression fails in 3.2