changed the signature of add method according to the base class
some more changes
Merge pull request #2352 from ilya-lavrenov:flann