Fixed -O0 switch on Mac OS X

On Mac OS X cflags are ignored. More [here](https://github.com/TooTallNate/node-gyp/issues/152) and solution [here](https://gist.github.com/TooTallNate/1590684).
Merge pull request #10 from mitar/patch-1

Fixed -O0 switch on Mac OS X
Allow specifying a callback. Don't write files.
Get a stack trace on Mac OS X as well.