Make sure the shared library doesn't appear in source builds, using various hacks