Link statically standard c++ libraries

This is the nupic.core counterpart to https://github.com/numenta/nupic/pull/1656.