Set compiler flags for building extension

Use CC and CXX environment variables to pick compiler when
building extension.

Set -std=c++11 to support C++11 compilation mode.