Compile code with -D_REENTRANT, as we are using multithreading.