Fix error introduced in last commit.
Fix Makefiles to link in Foundation framework when using static library.