fixed support for Perl 5.10 and 5.12