Fixes some warnings that are treated as errors due to -Werror

Errors discovered while testing on OpenBSD.
* malloc.h is obsolete.
* std::string::npos is a size_t so make sure it's comparison is too
(warning: comparison is always true due to limited range of data type)