Compilation error: #include <limits> required in several files

Looks like this was fixed in master in February but the fix wasn’t backported to the release branch.