startup code on Windows should use SetDllDirectory("")
See Raymond's blog about (un)safe dll loading. He points to a support article which recommends that new programs use
SetDllDirectory("") to prevent the problem (it's not the default because that'd break old programs).
In the GHC context, this could go in the startup code for standalone executables. It is a process-scope property so changing it is not appropriate for DLL startup.