Fix linking error causing overwrite of TLS variable
Update to new compiler, fix various bugs, add thread names