Fix incorrect passing of debug/release flags