Move Windows-specific code into a profile

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>