Support for Perl 5.005 - patch from Daniel Stränger