Fix MIME linkage test for dynamic libraries.