Fixes for compilation on windows

Signed-off-by: Dan Stowell <danstowell@users.sourceforge.net>