Fixing distinction between DIRECT and REQUIRE_DIRECT on OSX.
Disabling shared library building by default. Notes about this in the documentation.