avoid depending on POSIX symbol in code used from plain C functions