add ptr_table support for old perls lacking it