detect Perl6 and let indexing for Perl6 be a noop

Slightly improved version of #104.