Added #include <limits> to several files

These files failed to compile properly with mingw gcc 4.7.2