fix build fail if compile custom perl

fix build fail if compile custom perl and custom perl is not in PATH