Use uname command to detect Darwin platform

the same reason as https://github.com/haiwen/ccnet/pull/41

> A lot of people including me using iTerm2, not Apple Terminal, under OS X.
> It would be great if we can use $(uname) to detect darwin platform instead.