What version of Nim are you using? I tried this on Windows and it worked just fine.
Did you change currentSourcePath()? Also, how did you install nimterop? Note that libmodbus does not build the shared library on Windows with mingw-x64 since it cannot find -lws2_32 for some reason. However, I could get the -d:modbusStatic version to work.