Add -fvisibility=hidden and optionally -flto if they are supported
Merge pull request #721 from sjinks/opt-build

Allow gcc to better optimize the code