Fix code to work under current Perl 6.