[hack] fix garbage in environment use setenv not putenv
[hack] fix garbage in environment use setenv not putenv

Summary:
Somehow, the old code is putting uninitialized garbage in
the environment. This is surprising since we're initializing
everything in the array to zero, strcating stuff into place
and then handing it over to putenv.

putenv however is discouraged anyway and so I changed to code
to use setenv.

I also added an assertion that the type we're getting *really* is
an OCaml string.

Reviewed By: arxanas

Differential Revision: D7536580

fbshipit-source-id: 9c0a13481b6637a2554b344cc87613b6f94a1ac8

gabelevi/flow,gabelevi/flow,gabelevi/flow,jamesgpearce/flow,jamesgpearce/flow,popham/flow,jamesgpearce/flow,claudiopro/flow,samwgoldman/flow,AgentME/flow,jamesgpearce/flow,samwgoldman/flow,jamesgpearce/flow,AgentME/flow,gabelevi/flow,nmote/flow,nmote/flow,gabelevi/flow,samwgoldman/flow,mroch/flow,JonathanUsername/flow,mroch/flow,samwgoldman/flow,popham/flow,mroch/flow,JonathanUsername/flow,facebook/flow,JonathanUsername/flow,claudiopro/flow,jamesgpearce/flow,JonathanUsername/flow,AgentME/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow,samwgoldman/flow,nmote/flow,samwgoldman/flow,AgentME/flow,JonathanUsername/flow,popham/flow,nmote/flow,nmote/flow,facebook/flow,claudiopro/flow,claudiopro/flow,popham/flow,popham/flow,AgentME/flow,gabelevi/flow,jamesgpearce/flow,mroch/flow,samwgoldman/flow,gabelevi/flow,JonathanUsername/flow,facebook/flow,popham/flow,facebook/flow,popham/flow,nmote/flow,claudiopro/flow,JonathanUsername/flow,nmote/flow,facebook/flow