Fixing up some compile errors manifesting on Travis

Adding cmath for std::exp