Added multiplatform support
Fixed macos dynamic lib ext