Fixed crash under Perl 5.12 (reported by anonymous reviewer)