make tests work in 2.6, patch from Tres