Fix cost_lib compilation on Windows