Detect native multiarch directory on linux

Hi!
I took the bait on the mailing list to detect multiarch library directories on Debian/Ubuntu. I got as far as setting the native multiarch directory as a variable in site_config.lua, but I don't know how to proceed from there:

I can't simply add this directory to `external_deps_dirs`, because the multiarch directory doesn't have `lib`, `bin`, or `include` subdirectories, and I can't set `lib/x86_64-linux-gnu` as `(runtime_)external_deps_subdirs.lib`, because we would lose all the libraries still installed in `/usr/lib` and `/usr/local/lib`. Any ideas short of extending the current config file format?