now works on mac os x

`ping -n 1 <host>` not working on mac (tested 10.6–10.9)
Merge pull request #4 from apla/patch-2

now works on mac os x