Fixed build issues with default distance metric