Another thread intrinsic path that works for gcc >= 4.8
These new intrinsics work on platforms that the old ones did not.
Missing semicolon
Suggested by John Burnett
Fix Windows when OIIO_STATIC_BUILD, fixes by John Burnett
Bug fix from John Burnett
Fixes for VC9 and int types. Suggested by John Burnett