master
lib: use lib source directory as base include path
localtime: detect thread-safe alternatives and use them