Fixes for issues found on Windows

Change-Id: I15ab7959f2e22a306593870a499f36dcfdb5a972
Reviewed-on: https://pirx.atteo.com/gerrit/446
Tested-by: Mr. Jenkins
Reviewed-by: Sławek Piotrowski <sentinel@atteo.com>