Fix GMock to work on MSVC

This duplicates the logic of GMock's (pre-release) commit r675 in
order that GROMACS can build and test without problems on all MSVC
versions.

Change-Id: I8a7188d2d34fdfa2753a71291d8528e5c9753c6d