fixup compilation for OS X

Apparently OS X does not provide an int std::abs(int) at all, or
we aren't including it properly or someting. I work around this.