add threaded flag to ghc options for test build