Fix natives not fully exported on Linux

The .api files generated at build time were not added to dependencies
of the command running symgen, and might be not available at the time
the script was run. The symbols were still exported though (though the
dynamic symbol table), that's why there were no link errors building
helloworld, but they were not part of nm output (which lists entries of
the "normal" symbol table unless run with -D flag)
Add -fvisibility=hidden to GCC flags on Linux