Add support for -lmcheck when compiling debug builds.