configure: Make check_type handle type names containing spaces