Fixes for Unix. (thanks to Philippe Joyez)
Merge pull request #8 from mgubi/master

Some fixes to compile on Unix.