portability: allow building with clang

* don't use nested functions which are not supported by clang
* use -version-script=symbol.map instead of -version-script symbol.map