Build R with shared library support.