Add -thread flag.
Fix module reference.