Fix compilation on OSX

stack_t is typedef'd to struct __darwin_sigaltstack in signal.h on OSX,
which causes problems. Rename to canny_stack to fix conflict.

Additionally, fix implicit use of free from stdlib.h in common.h for
more picky compilers.
Merge pull request #1 from torque/osxbuildfix

Fix compilation on OSX