Add support for *nix Makefile debug builds and turning thread support off.