Fixed compile error due to missing code on official build linux
Fixed atomic vars not having default value on linux
Fixed linux compile errors
Fixed unit test failing
Merge pull request #885 from lodle/linux-fixes-2

Linux fixes 2