Only append -debug to variants when both BUILD_DEBUG and BUILD_RELEASE are ON. Fixes bug that tests wouldn't link when only BUILD_DEBUG was ON.