smurf: Move feature test macro before includes
smurf: Enable POSIX for setenv definition