OS X: no malloc.h
OS X: clang does not accept nested function definitions
OS X: update tested distributions in README
Merge pull request #11 from su-v/master

Modifications to make it work with CLANG.