Fix compile error for std::max on 32bit systems

- unexpected comparison for `max(int64_t, long int)`
Merge branch 'fix/32bit' into topic/travis-ng