Fix for using pthread compilation