tweaks to allow compiling under Win32 and Win64 (thanks to Javier Gutiérrez)