build: only attempt to use -Og if it's supported