Fixes for ffmpeg and Mac OSX

- Made the Makefile work under OSX 10.8
- Made the WAV header parsing work with what ffmpeg outputs: https://ffmpeg.org/trac/ffmpeg/ticket/1843