Fix dependence on -pthread causing unnecessary rebuilds of executables
Move stream_noop_close to stream.c
Avoid errors about va_copy redefined when building without -ansi