build: Add -isystem and set specialized flags as a last configuration step

This change prevents global flags from interacting with library/feature
detection scripts.

Change-Id: Ic0dba06a9afd66a810172d4a512f35f6df6b25b6
Refs: #4296
diff --git a/wscript b/wscript
index beb9c21..af0748b 100644
--- a/wscript
+++ b/wscript
@@ -124,6 +124,8 @@
     else:
         conf.env['WITH_OSX_KEYCHAIN'] = False
 
+    conf.check_compiler_flags()
+
     # Loading "late" to prevent tests to be compiled with profiling flags
     conf.load('coverage')