The ld command does not support the -pthread or -threads switches. Instead, you must list the individual libraries in the proper order.
For libraries using only the 1003.1c-1995 interface, you would use the following:
ld <...> -lpthread -lmach -lexc -lc
If using the cma or 1003.4a Draft 4 interfaces, you would use the following:
ld <...> -lpthreads -lpthread -lmach -lexc -lc