Merge pull request #1851 from jimis/cfupgrade

Remove dependencies from libutils.
Fix Windows compilation in debug mode.
Some GCC versions disallow #pragma inside function body.