do environment variables saving/restoring for --with-pthreads too