1.8 compatibility fix for tests.