Fix typo that caused incorrect library names to be set.

CMake's variable scoping rules meant that _location was global
and we were not re-setting it every time we re-entered the
_add_cache_library macro.