Merge pull request #1 from jaalto/debian

Debian accumulated fixes over the years
only include malloc.h for non-osx systems
ignore generated binary
Check malloc.h for __APPLE__ and HAVE_MALLOC_H

Signed-off-by: Jari Aalto <jari.aalto@cante.net>