Use `-Og` flag if compiling in debug mode with GCC
Adapted to newest libs