Fix pickling issues with class deprecation.  Fix Python 2.6 bug.