Modifications to enable compilation on VS12.