Fixed a couple of build errors on non-test target