Adapt RealValueVector pickling for python3.