Apply @synergydev's patch to fix compiler flags