Removed some outcommented lines
Added check for '-pthread' compiler flag
Added macro to check for header files, may not work properly