Fix compile time errors.

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)
Include missing header unistd.h
Merge pull request #2 from terceiro/sid

Include missing header unistd.h
Merge pull request #1 from jturner/master

Fixes some warnings that are treated as errors due to -Werror.

Much appreciated.
  Using github is fine before this file is empty.

  We'll also indent our code consistently before publishing
 .deb files.
  Simplify the fetching of header fields.

  We could use this to display arbitrary headers in the format-string.
  There is now a global keymap.

  The keymap determines which functions are called as a result of
 keypresses.  There is now a table called 'global' which will be
 consulted prior to the per-mode table.
  Removed.  Duplicated issues to github tracker.
  Use the global-keymap now we have it.

  There is now a global table for keybindings that work in all
 modes:

         http://lumail.org/lua/keymap.html