putenv: fix heap corruption with mixed putenv/_putenv