Port to Mavericks

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

[cpplint] `{` should be at the end of previous line.