Add shared library support for dmd

I looked in to supporting gdc and ldc as well, but couldn't get either to work with the module.

Linking against shared libs doesn't work in the latest dmd release, pending a version which includes [this fix](http://github.com/D-Programming-Language/dmd/pull/3397). Dynamic loading works fine, however.