FIX: multiple fixes for building the red binary on non-Windows platforms.