Fixed tests compilation and linking.