Fixed linking errors for tests