Added missing casts causing assertion failures on Windows (#5391)
-> Changed much more occurences, especially in preprocessor.cpp.