fix building by Cygwin: Cygwin defines _sys_nerr instead of sys_nerr, the issue has been introduced in r3788