incorporate some fixes from https://github.com/eam/libcrange/pull/2, avoid /usr/bin/perl on OSX per https://github.com/eam/libcrange/issues/7