added conditional for POSIX systems