compiler: Add exported static libraries flag (and implementation for GCC).