Add "-static" to ldflags when building static dependencies to link statically to libwinpthread