fixed pgrep for mac OS