Don't build Foundation if SKIP_FOUNDATION is defined.

Closes #18
Use Foundation's configuration to control how to link to it.