Fix tr1 headers

Added #ifdef _MSC_VER guards to include tr1 headers