Forked from http://github.com/component/closest