Fixed a bug that caused test failures in Perls older than 5.8.9