Fix for shared library compilation

Building shared libraries previously failed due to -fPIC flag not being sent to individual object files, and due to DMD defaulting the static libphobos2 regardless of what library type is requested. This patch fixes those particular issues.