Fix kill command in build.sh to work on OSX

Would this work now both in Linux and OS X?