Incorrect use of the time struct.
Uninitialized variable.
Merge pull request #12 from clementfarabet/master

OSX build issues.