this fixes commit#6dca1d3a6d64f6b55d5545fd209acc0f81aab9ec in OSX, need to include cmath to use std::abs