GHC compiling shared library linking problem