Fix macro expansion on VC9

When compiling with VC9 it appears that in the following line:

std::numeric_limits<IdType>::max()

max gets expanded as a macro and the following error occurs:

 error C2589: '(' : illegal token on right side of '::'

Adding ( ) around it prevents the macro expansion.

Change-Id: I659c877de26ba1e900f097552682d7e6d0b57bb3
Merge topic 'msvc9-fix' into master

00a03cba Fix macro expansion on VC9