Fix module ids when building on Windows

Since module ids are manipulated using the path module, sometimes
backslashes are introduced into module ids on Windows. Explicitly
replace all backslashes with forward.