Checking for dlfcn.h instead of creat() should make the Cabal build fail more gracefully under MinGW.