Fix deadlock in rb_fork_internal