Made makefile honor $CXX environment variable, and fixed build error rel...

...ated to "make build" target.