replaced pgrep

pgrep isn't available on OSX prior to 10.8