Fix native cursor global handle passing