winpr-environment fix and winpr-thread fix