reenable cross compilation

When I tried to move forward to the tip of ardb, I discovered that several changes made to support cross compilation had been undone. The bulk of these changes were already committed as part of commit 4b0b7d38682fa1610c40dd19cfbbe3015eb96a10. The one new change is `#include <cmath>` which solved a problem where `std::abs` was ambiguous for the compiler.