Fix confusion with min/max windows macros, also make sure to generate import libs