Only compile the relevant cbits on each platform.

This works around a limitation of the OS X linker, which complains if
the object file exports no symbols.