Fixed library dependencies and make dll link statically to standard library