From Laurens Voerman, compile fix for VisualStudio