Unit tests weren't being built with link=shared, so maybe that caused a problem on gcc-4.6?

This change didn't make a difference for me locally, but maybe it will fix things on travis.