Patch from "Stjepan Rajko" <stipe@…> that fixes some compile warnings and a compile error under MSVC.