Fix if conditions in build.sh
Earlier comment removed quotation from around command substitions $().
This is not a good idea,
because if the substitution produces whitespace,
without the quotes, the result is not interpreted as a single string.
Pattern 'if [ $(uname) == "foo" ]'
is replaced with 'uname | grep -iwq foo' here.
Apart from following good shell scripting practices,
this commit fixes the problem where the script failed
if the current working directory's patch contained whitespace.