Port to Mavericks

Ported to Mavericks.
To build on Maverics, type as following:

```
CXXFLAGS=-std=c++11 ./waf configure
./waf
```

[cpplint] line should be <= 80.