Make hardbinding branch work on windows

This makes the hardbinding branch work on windows. It shouldn't break other platforms