Mac doesn't have the -whole-archive option for ld.

This is a problem that'll need to be fixed upstream, but this makes it work for now.