Provide 'clock_gettime' on Darwin

Darwin does not implement 'clock_gettime'. Provide an implementation
based on 'gettimeofday' on Darwin.

Signed-off-by: Jussi Virtanen <jussi.k.virtanen@gmail.com>
Include 'libgen.h' in 'test-fix-server'

'basename' is not declared on Darwin unless 'libgen.h' is included.

Signed-off-by: Jussi Virtanen <jussi.k.virtanen@gmail.com>
Merge pull request #7 from jvirtanen/features/darwin

Make library buildable on Darwin