Added support for dynamic linking on windows.