Move weak to optional dependencies
Handle weak module not being present even when weak is not set to false