Add compatibility unpickler for python 3, use it in test