fix the test syntax and use -shared-libgcc only with gcc