Resolve depends attribute with respect to include_dirs.

This is needed to correctly build the right modules for Sage when the underlying c libraries change.