Fixes to make the brain-damaged GCC 4.9.0 compiler happy.
std::erf is a C++11 function.