use XS instead of XS_INTERNAL for older versions of Perl