[#858] use solaris-friendly grep in entire build.sh