Prevent bug in threads::shared from causing problems
Effective only for Perl < 5.19.8.