windows compile + optional alternate magic header

windows compile (MSVC2010) - std::min, WINBOOL typedef was needed for my compile on Visual Studio 2010

SetAlternateMagicBeforeVersion allows a second, customizable file header. I've been maintaining it locally and it would be nice to have it included in kpu:master (nice for me, at least).