fixed Perl 5.18.x compatibility