Provide SIZE_MAX fallback

SIZE_MAX is in C99, but not in C89. It is in <stdint.h>, and is always a
macro, so this fallback should be pretty portable and cause no issues.
Check more mallocs

This is just a start and gets most easy ones.