fix build break. Make pragmas conditional on compiler version