Fixing posix compilation issues