Correct handling of long type in kd_tree.py for Python 2.