Fixed compile errors in VS / gcc for recent commits.

Tested: on Windows & Linux.

Change-Id: I90e18c448fc2fafeb83a6cdc3776174479874562