dll and unit test fixes for python-2.6 & 2.7