Upgrade dependencies, adapt to all platforms