issue-583: include pthread.h into static_var.cc

Because we're doing pthread_atfork.

Fix suggested by user named drussel.