Replace constants.h with buildsystem defines

@BugFreeSoftware, please test this one too.
Better make this if(MSVC)
WIN32 is only for the 32-bit compilation. We want 64-bit compilation to work, too