Enabled "./configure" caching
Fixed segfaults in threaded mode