Fix build with switch.pm for newer versions of Perl