Add basic support for optional dependencies