Fixed deprecation warnings and compile errors for latest DMD master.
Add workaround for shared objects and toHash() with the latest DMD master.