Fixed a couple of compilation breaking issues when not doing a thread aware build.