roken: Use ptsname_r() if we have it